Skip to content

refine the translation of chapter 12-context#6665

Merged
jimfb merged 1 commit intofacebook:masterfrom
Yaxian:DOC/refine-chap12-translation
May 7, 2016
Merged

refine the translation of chapter 12-context#6665
jimfb merged 1 commit intofacebook:masterfrom
Yaxian:DOC/refine-chap12-translation

Conversation

@Yaxian
Copy link
Copy Markdown
Contributor

@Yaxian Yaxian commented Apr 30, 2016

Hi, I made the translation of context better.

@ghost
Copy link
Copy Markdown

ghost commented Apr 30, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@Yaxian
Copy link
Copy Markdown
Contributor Author

Yaxian commented Apr 30, 2016

@facebook-github-bot-7 I have registered.

@ghost
Copy link
Copy Markdown

ghost commented Apr 30, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ghost ghost added the CLA Signed label Apr 30, 2016
Comment thread docs/docs/12-context.md Outdated
render: function() {
return (
<button style={{'{{'}}background: this.context.color}}>
<button style={{background: this.context.color}}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was correct as-is, as per our MD generator. You should try rendering the docs as described in the README in the docs directory.

Copy link
Copy Markdown
Contributor Author

@Yaxian Yaxian May 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it worked fine in browser after modifying.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and the others like it you changed) needs to be written as it was, as Jim said. It may render correctly in the GH preview but will not render correctly when using Jekyll because {{ is an opening tag for Liquid templating which is used for the actual website..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zpao Sorry, I did not know that {{ is a Jekyll's opening tag. Thank you for it. And I already reverted the change.

@jimfb
Copy link
Copy Markdown
Contributor

jimfb commented Apr 30, 2016

Also, looks like there are merge conflicts.

@Yaxian
Copy link
Copy Markdown
Contributor Author

Yaxian commented May 1, 2016

@jimfb OK, I will fix it.

@ghost
Copy link
Copy Markdown

ghost commented May 1, 2016

@Yaxian updated the pull request.

Comment thread docs/docs/12-context.zh-CN.md Outdated
> Context是一个先进的实验性特性这个 API 很可能在未来版本变化
>
> 大多数应用将不会需要用到 context. 尤其是如果你刚开始用React,你很可能不会想用 context.使用 context 将会使你的代码很难理解因为它让数据流不清晰.它类似于在你的应用里使用全局变量传递state.
> 大多数应用将不会需要用到 context 尤其是如果你刚开始用React你很可能不会想用 context使用 context 将会使你的代码很难理解,因为它让数据流不清晰。它类似于在你的应用里使用全局变量传递state
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you remove the whitespace after the first "。"?

@ghost
Copy link
Copy Markdown

ghost commented May 2, 2016

@Yaxian updated the pull request.

有时,你想不通过在每一级组件设置prop的方式来向组件树内传递数据。那么,React的"context"特性可以让你做到这点

> 注意:
> 
Copy link
Copy Markdown
Contributor

@keyz keyz May 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the empty ">" lines might affect Jekyll's Markdown parsing. I could be wrong though. Could you build the docs (instructions here) to double check if the page renders correctly? Thanks! 😀

Copy link
Copy Markdown
Contributor Author

@Yaxian Yaxian May 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will have fixed it, and squashed the commits.

@ghost
Copy link
Copy Markdown

ghost commented May 3, 2016

@Yaxian updated the pull request.

1 similar comment
@ghost
Copy link
Copy Markdown

ghost commented May 3, 2016

@Yaxian updated the pull request.

@ghost
Copy link
Copy Markdown

ghost commented May 3, 2016

@Yaxian updated the pull request.

@keyz
Copy link
Copy Markdown
Contributor

keyz commented May 7, 2016

I think this is ready to merge.

@jimfb
Copy link
Copy Markdown
Contributor

jimfb commented May 7, 2016

Ok, thanks @Yaxian and @keyanzhang!

@jimfb jimfb merged commit 9ddf9e1 into facebook:master May 7, 2016
@Yaxian Yaxian deleted the DOC/refine-chap12-translation branch May 8, 2016 14:42
zpao pushed a commit that referenced this pull request May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants